perm filename TFX.FML[UP,DOC]1 blob
sn#381108 filedate 1978-09-18 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00005 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 For each font used with TEX, there must be a .TFX file on the same area as
C00005 00003 To generate a .TFX file for an existing XGP font, use the TFXGEN program.
C00008 00004 To edit .TFX files, first use the TFXPR program to create a .TFD text file
C00012 00005 To create a .TFD file from a .TFX file, say "R TFXPR" and then type in the
C00014 ENDMK
C⊗;
For each font used with TEX, there must be a .TFX file on the same area as
the font. TEX doesn't look at the actual font file; it gets all its font
information from the .TFX file.
To create a .TFX file for an existing XGP font, use TFXGEN (see page 3).
To edit .TFX files, use TFXPR and TFDRD (see pages 4-5).
The information contained in the .TFX file is described below. Unless
otherwise specified, all dimensions are in points.
1. Dimensions of each character:
width, height, depth, device width (pixels), and italic correction.
The width, height, and depth refer to the dimensions of the box
containing the character (see p. 42 of the TEX manual).
The device width tells TEX how many units of horizontal space the
output device will advance after printing this character.
The italic correction is the amount by which the character extends to
the right of its box (only used by italic fonts, usually).
2. Other font parameters:
slant the slope of the italic slant (used when placing
accents over characters)
space the normal width of a blank space
spacestretch the stretch component of the glue for spacing
spaceshrink the shrink component of the glue for spacing
xheight the height of lowercase "x" (default position for accents)
quad the width of one "em"
tallestchar the height above the baseline of the tallest character
in the font (pixels)
3. Ligatures and kerns. A ligature is a character pair (e.g. "f" and "l")
which is to be replaced by a single ligature character. A kern involves
a character pair which is to be moved closer together or farther apart
for better appearance.
To generate a .TFX file for an existing XGP font, use the TFXGEN program.
To run TFXGEN, say "R TFXGEN" and then type in the font name (the default
extension is .FNT). If no ppn is specified, the program looks first on
your directory and then on [XGP,SYS]. You will then be asked for an
output filename (type <cr> to get the default).
Here is how TFXGEN determines the dimensions of each character:
width ← character_width;
height ← baseline - rows_from_top;
depth ← data_row_count - baseline;
device_width ← width;
(Note: The .TFX file allows at most 64 different widths, 16 different heights,
and 16 different depths. If necessary, TFXGEN "rounds" some dimensions.)
Most XGP fonts have their characters "left-justified" in the bit raster,
while TEX fonts have their characters centered. Thus a slight (horizontal)
offset might be noticed when mixing TEX fonts and regular XGP fonts.
The generated .TFX file does not contain any italic corrections, ligature
substitutions, or kerns. To add these, use TFXPR and TFDRD.
The other font parameters are determined as follows:
slant ← 0.;
space ← width of character '40;
spacestretch ← space/2.;
spaceshrink ← space/2.;
xheight ← height of lowercase "x";
quad ← 2.* width of character "0";
To edit .TFX files, first use the TFXPR program to create a .TFD text file
which contains the .TFX font information in readable form. The .TFD file
can be edited using E and then converted back to a .TFX file using the
TFDRD program.
The format of the .TFD file is as follows (standard font):
0. Font type and dimension units:
fonttype = 1 (standard), 2 (mathex), or 3 (mathsy)
units = 1 (points) or 2 (pixels)
1. Dimensions of each character:
character code (in octal), height, width, depth, device width, and
italic correction (may be left blank).
The data for each character must appear on one line. (The characters
may appear in any order.) The end of this section is indicated by a
-1 after the last character.
2. Font parameters:
slant, space, spacestretch, spaceshrink, xheight, quad, tallestchar
3. Ligatures and kerns.
Probably the easiest way to understand the .TFD format of ligatures
and kerns is to look at an actual file generated by TFXPR.
Some examples are given below.
"f": "l" '175 -1
This specifies that when the character pair "fl" occurs, it is to be
replaced by character '175 in the font. The colon (:) must be present.
Note that characters can be specified either as one-letter strings or as
octal numbers. Non-printing characters and the double-quote character
('42) must be specified in octal.
"A": "V" -5.000 -1
This specifies that when the character pair "AV" occurs, the "V" is to
be moved 5 units of space closer to the "A".
Important: All of the ligatures and kerns with the same first character
must appear consecutively, with the end of the list indicated by a -1.
However, different first characters can share entries, as shown below.
"n":
"m":
"h": "t" -1.000
"u" -1.000
"b" -1.000
"o": "v" -1.000
"x" -1.000
"y" -1.000
"t": "w" -1.000 -1
Here n, m, and h each have the same kerns with t, u, b, v, x, y, and w;
o has kerns with v, x, y, and w; and t has a kern with w.
The end of the ligatures and kerns section is indicated by a -1.
To create a .TFD file from a .TFX file, say "R TFXPR" and then type in the
font name (default extension .TFX). If no ppn is specified, the program
looks first on your directory and then on [XGP,SYS].
The program then asks you for an output filename, whether the dimensions
are to be printed in points or pixels, and for the number of decimals to
be printed with real numbers. Type <cr>'s to get the indicated defaults.
Note that the .TFD file is normally written on your own area.
To convert the (edited) .TFD file back to a .TFX file, say "R TFDRD", type
in the font name (default extension .TFD), and then type in the output
filename. If you want to output on [XGP,SYS] you must say so explicitly
(unless you have cheated and put the .TFD file there).
Note: If you have modified the .TFD file so that it contains more than 64
different widths, 16 different heights, or 16 different depths, you will
get a message like "munging width at character 'xxx". This means that
TFDRD has "rounded" the width to the nearest of the first 64 widths.
If this is not what you want, you should re-edit the .TFD file, possibly
rearranging the characters.